﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DACU.VkontakteApi.Enums;

namespace DACU.VkontakteApi
{
	class SessionInfo
	{
		public int Expire;
		public string UserId;
		public string Secret;
		public string Id;
		public string Signature;
		internal int _permissions;

		private VKPermissions _permission = VKPermissions.Error;
		public VKPermissions Permissions
		{
			get
			{
				if(_permission==VKPermissions.Error)
					return _permission=(VKPermissions) _permissions;
				return _permission;
			}
		}

		public bool HasPermission(VKPermissions permission)
		{
			return (Permissions & permission) == permission;
		}
	}
}
